package br.gfca.simplenet.test.chat;

/**
 * @author Gustavo
 * Defines constants for headers of messages exchanged
 * between server and client.
 */
public class MessageHeaders {
	
	// header prefixes for multiplicity
	// unicast: server -> client or client -> server
	public static final String UNICAST = "UNC_";
	// broadcast: always server -> clients
	public static final String BROADCAST = "BDC_";
	
	// client messages (chat) header
	// message prefix
	public static final String MESSAGE = "MSG_";
	// unicast message
	public static final String MESSAGE_UNICAST = MESSAGE + UNICAST;
	// broadcast message
	public static final String MESSAGE_BROADCAST = MESSAGE + BROADCAST;

	// control messages header
	// control prefix
	public static final String CONTROL = "CTRL_";
	// header to inform nick to server
	public static final String CONTROL_UNICAST_INFORM_NICK = CONTROL + UNICAST + "INF_NICK_";
	// header to inform clients of user disconnection
	public static final String CONTROL_BROADCAST_USER_DISCONNECTED = CONTROL + BROADCAST + "USER_DISC_";
	// header to inform clients of user kicking
	public static final String CONTROL_BROADCAST_USER_KICKED = CONTROL + BROADCAST + "USER_KICK_";
	// header to inform clients of new user arrival
	public static final String CONTROL_BROADCAST_NEW_USER = CONTROL + BROADCAST + "NEW_USER_";
	// header to inform current users to the newcomers
	public static final String CONTROL_UNICAST_INFORM_USERS = CONTROL + UNICAST + "INF_USERS_";
}